<!--{eval $bodyClass ='center-vh overflow-y-auto';}-->
<!--{template lyear:header_simple}-->
<!--{eval $loginhash = 'L'.random(4);}-->
<div id="wrapper_div" style="width: 100%;height:100%;  position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; overflow: hidden;z-index:0;  font-size: 0px; background:{eval echo $_G['setting']['loginset']['bcolor']?$_G['setting']['loginset']['bcolor']:'#76838f';};"> 
	<!--{if !$_G['setting']['loginset']['bcolor']}-->
	<img src="{eval echo $_G['setting']['loginset']['img']?$_G['setting']['loginset']['img']:MOD_PATH.'/images/login.jpg';}" name="imgbg" id="imgbg" style="right: 0px; bottom: 0px; top: 0px; left: 0px; z-index:1;margin:0;padding:0;overflow:hidden; position: absolute;width:100%;height:100%" height="100%" width="100%">
	<!--{/if}-->
    <!--{if $_G['setting']['loginset']['url']}-->
    <iframe id="wrapper_frame" name="wrapper_frame" src="$_G['setting']['loginset']['url']" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" allowtransparency="true" style="z-index:2;position:absolute;width:100%;height:100%;background:url(dzz/images/b.gif);"></iframe>
    <!--{/if}-->
</div>
<div class="card card-shadowed p-4 mb-0 mr-2 ml-2" style="width: 420px;" id="lostpw_container_$loginhash">
    <div class="card-body text-center">
        <div class="text-center mb-3">
            <img src="<!--{if $_G['setting']['bbclosed']}-->static/image/common/logo.png<!--{else}-->{eval echo $_G['setting']['sitelogo']?'index.php?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$_G['setting']['sitelogo']):'static/image/common/logo.png';}<!--{/if}-->">
        </div>
        <h2 class="main-title">{lang getpassword}</h2>
        <div class="Mbody">
            <form class="signin-form loginForm" method="post" autocomplete="off" id="lostpwform_$loginhash" role="form"  onsubmit="lyearlostpass('lostpw_container_$loginhash','lostpwform_$loginhash','returnmessage3_$loginhash');return false;" action="user.php?mod=login&op=logging&action=lostpasswd">
                <input type="hidden" name="formhash" value="{FORMHASH}" />
                <input type="hidden" name="lostpwsubmit" value="true" />
                <input type="hidden" name="handlekey" value="lostpw_$loginhash" />
                <p class="text-muted">请输入账户的注册邮箱地址，我们将发送重设密码链接至该邮箱。</p>
                <div class="mb-3 has-feedback">
                    <span class="mdi mdi-mail" aria-hidden="true"></span>
                    <input type="text" class="form-control" name="email" id="lostpw_email"  value=""  placeholder="{lang fill_your_login_email}" required/>
                </div>
                <p class="error-msg text-danger text-center" id="returnmessage3_$loginhash"></p>
                <div class="mb-3 d-grid">
                    <button class="btn btn-round btn-primary lyearloading" type="submit" id="loginsubmit" name="loginsubmit" value="true">{lang sure_find}</button>
                    <a href="user.php?mod=login" class="btn btn-round btn-success mt-1">{lang back_login}</a>
                  </div>
            </form>
            <script type="text/javascript">
                jQuery(document).ready(function(e) {
                    jQuery('#lostpw_email').focus();
                    if(jQuery('.ie8').length){ //ie8模拟placeholder;
                        jQuery(':input[placeholder]').each(function(){
                            jQuery(this).placeholder();
                        });
                    }
                });
                function lyearlostpass(contid,formid,rspaceid){
                    var url = jQuery('#'+formid).attr('action');
                    url = (url)? url:'user.php?mod=login&op=logging&action=lostpasswd&lostpwsubmit=yes';
                    var formData = jQuery('#'+formid).serialize();
                    var type = 'json';
                    var loader = $('.card-shadowed').lyearloading({
                        opacity           : 0.1,
                        textColorClass    : 'text-primary',
                        spinnerColorClass : 'text-primary',
                        spinnerSize       : 'nm',
                        spinnerText       : '后台处理中，请稍后...',
                    });
                    jQuery.post(url+'&returnType='+type,formData,function(json){
                        loader.destroy();
                        if(json['success']){
                        var el=jQuery('#'+contid);
                            var mail='http://mail.'+json['success'].email.split('@')[1];
                            el.find('.Mtitle').html(__lang.password_back_email_sent_successfully);
                            el.find('.Mbody').html(json['success'].msg);
                            el.find('.modal-footer .toMail').on('click',function(){
                                window.location.href=mail;
                            })
                            el.find('.modal-footer').show();
                        }else if(json['error']){
                            jQuery('#'+rspaceid).html(json['error']);
                        }else{
                            jQuery('#'+rspaceid).html(__lang.system_busy);
                        }
                    },'json').fail(function (jqXHR, textStatus, errorThrown) {
                        loader.destroy();
                        showmessage('操作失败，请稍后再试: ' + textStatus, 'error', 3000, 1);
                    });
                }
            </script>
        </div>
        <div class="modal-footer" style="display:none;">
            <button type="button" class="btn btn-primary toMail" >{lang now_your_email}</button>
            <button type="button" class="btn btn-default toIndex" onclick="location.href='$_G[siteurl]'">{lang back_homepage}</button>
        </div>
    </div>
    <p class="text-center text-muted mb-0"><!--{template lyear:copyright}--></p>
</div>
<!--{template lyear:footer}-->